
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
  <base href="/">
  <meta charset="utf-8">
  <title>用户中心</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="keywords" content="fly,layui,前端社区">
  <meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区，致力于为web开发提供强劲动力">
  <link rel="stylesheet" href="layuiadmin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="layuiadmin/style/admin.css" media="all">
  <link rel="stylesheet" href="res/css/global.css">
</head>
<body>

<div class="fly-header layui-bg-black">
  <div class="layui-container">
    <a class="fly-logo" href="/">
      <img th:src="${index[0].blogLogo}" alt="layui" width="200" height="40">
    </a>
    
    <ul class="layui-nav fly-nav-user">
      <!-- 登入后的状态 -->
      <shiro:user>
        <li class="layui-nav-item">
          <a class="fly-nav-avatar" href="javascript:;">
            <cite class="layui-hide-xs"><shiro:principal/></cite>
            <i class="iconfont icon-renzheng layui-hide-xs" title="认证信息：layui 作者"></i>
            <i class="layui-badge fly-badge-vip layui-hide-xs">VIP3</i>
            <img src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg">
          </a>
          <dl class="layui-nav-child">
            <dd><a href="user/userInfo"><i class="layui-icon">&#xe620;</i>基本设置</a></dd>
            <dd><a href="/"><i class="layui-icon" style="margin-left: 2px; font-size: 22px;">&#xe68e;</i>我的主页</a></dd>
            <hr style="margin: 5px 0;">
            <dd><a href="javascript:;" id="logut" style="text-align: center;" >退出</a></dd>
          </dl>
        </li>
      </shiro:user>
    </ul>
  </div>
</div>

<div class="layui-container fly-marginTop fly-user-main">
  <ul class="layui-nav layui-nav-tree layui-inline" lay-filter="user">
    <li class="layui-nav-item">
      <a href="/">
        <i class="layui-icon">&#xe609;</i>
        我的主页
      </a>
    </li>
    <li class="layui-nav-item">
      <a href="user/userindex">
        <i class="layui-icon">&#xe612;</i>
        用户中心
      </a>
    </li>
    <li class="layui-nav-item">
      <a href="user/userInfo">
        <i class="layui-icon">&#xe620;</i>
        基本设置
      </a>
    </li>
    <li class="layui-nav-item">
      <a href="user/listUserBlog">
        <i class="layui-icon">&#xe60a;</i>
        文章管理
      </a>
    </li>
    <li class="layui-nav-item">
      <a href="user/store">
        <i class="layui-icon">&#xe735;</i>
        VIP管理
      </a>
    </li>
    <li class="layui-nav-item layui-this">
      <a href="user/order">
        <i class="layui-icon">&#xe63c;</i>
        订单管理
      </a>
    </li>
  </ul>

  <div class="site-tree-mobile layui-hide">
    <i class="layui-icon">&#xe602;</i>
  </div>
  <div class="site-mobile-shade"></div>
  
  <div class="site-tree-mobile layui-hide">
    <i class="layui-icon">&#xe602;</i>
  </div>
  <div class="site-mobile-shade"></div>
  
  
  <div class="fly-panel fly-panel-user" pad20>
    <!--
    <div class="fly-msg" style="margin-top: 15px;">
      您的邮箱尚未验证，这比较影响您的帐号安全，<a href="activate.html">立即去激活？</a>
    </div>
    -->
    <div class="layui-tab layui-tab-brief" lay-filter="user">
      <table id="LAY-user-back-role " class="demo" lay-filter="LAY-user-back-role"></table>
      <script type="text/html" id="buttonTpl">
        {{#  if(d.orderStatus == 1){ }}
        <button class="layui-btn layui-btn-xs">充值成功</button>
        {{#  } else { }}
        <button class="layui-btn layui-btn-primary layui-btn-xs">充值失败</button>
        {{#  } }}
      </script>
    </div>
  </div>
</div>
<footer th:replace="footer::header-fragment"></footer>
<script th:replace="footer::script-fragment"></script>
<script src="layuiadmin/layui/layui.js"></script>
<script>
  layui.cache.page = 'user';
  layui.cache.user = {
    username: '游客'
    ,uid: -1
    ,avatar: 'res/images/avatar/00.jpg'
    ,experience: 83
    ,sex: '男'
  };
  layui.config({
    version: "3.0.0"
    ,base: 'res/mods/'
  }).extend({
    fly: 'index'
  }).use('fly');
  layui.config({
    base: 'layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'contlist', 'table','laypage'], function(){

    var table = layui.table;
    var laypage = layui.laypage;
    var form = layui.form;

    table.render({
      elem: '.demo'
      ,url: 'user/findorder',
      page: true //开启分页
      ,cols: [
        [
          {field:'orderId', title:'订单ID', width:120,align:'center',unresize:true},
          {field:'orderBalance', title:'充值金额', width: 160,align:'center',unresize:true},
          {field:'orderNumber', title:'订单号', width:260,align:'center',unresize:true},
          {field:'orderTime', title:'充值时间', align:'center',unresize:true,templet: "<div>{{layui.util.toDateString(d.orderTime, 'yyyy-MM-dd HH:mm:ss')}}</div>"},
          {field:'right', title:'充值状态',toolbar:'#buttonTpl',unresize:true, width:120,align:'center',unresize: true}
        ]
      ]
      ,limits: [5,10,20,50]  //每页条数的选择项，默认：[10,20,30,40,50,60,70,80,90]。
      ,limit: 5 //每页默认显示的数量
      ,parseData: function(res) { //res 即为原始返回的数据
        return {
          "code": 0, //解析接口状态
          "msg": "", //解析提示文本
          "count": res.count,
          data: res.data.items //解析数据列表
        };
      }
    });
    $('.layui-btn.layuiadmin-btn-tags').on('click', function(){
      var type = $(this).data('type');
      active[type] ? active[type].call(this) : '';
    });
    table.reload('LAY-user-back-role');
  });
</script>

</body>
</html>